package com.health.income.server.controller;

import com.health.common.core.domain.R;
import com.health.common.domain.PmsMedic;
import com.health.common.domain.PmsSymptomTags;
import com.health.income.server.service.SymptomTagsService;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassName SymptomTagsController
 * @Description 描述
 * @Author Qiu Feng
 * @Date 2025/2/25 15:22
 */
@RestController
@RequestMapping("/symptomTags")
public class SymptomTagsController {
    @Autowired
    private SymptomTagsService symptomTagsService;

    /**
     * 查询所有的症状标签
     */
    @GetMapping("/getSymptomTagsAll")
    public R<List<PmsSymptomTags>> getSymptomTagsAll() {
        List<PmsSymptomTags> symptomTagsList = symptomTagsService.getSymptomTagsAll();
        return R.ok(symptomTagsList);
    }

    /**
     * 医生列表
     */
    @PostMapping("/getMedicList")
    public R<List<PmsMedic>> getMedicList(@RequestBody PmsMedic pmsMedic) {
        List<PmsMedic> medicList = symptomTagsService.getMedicList(pmsMedic);
        return R.ok(medicList);
    }


    /**
     * 初始化医生列表
     */
    @PostConstruct
    public void MedicList() {
        symptomTagsService.MedicList();
    }


}
